package problems;

import lib.MathLib;

public class Euler002 extends AbstractEuler {

	@Override
	public Number calculate() {
		long sum = 0;
		for (int i = 1; MathLib.fibo(i).longValue() < 4000000; i++) {
			long fibo = MathLib.fibo(i).longValue();
			if (fibo % 2 == 0) sum += fibo;
		}
		return sum;
	}

	@Override
	protected Number getCorrectAnswer() {
		return new Long(4613732);
	}

}
